package com.group.sliding.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.group.sliding.domain.dto.OrderFormDTO;
import com.group.sliding.domain.po.Order;
import com.group.sliding.domain.query.OrderPageQuery;
import com.group.sliding.domain.vo.OrderDetailVO;
import com.group.sliding.domain.vo.OrderVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 */
public interface IOrderService extends IService<Order> {

    Order createOrder(OrderFormDTO orderFormDTO);

    void markOrderPaySuccess(Long orderId);

    Page<Order> search(OrderPageQuery query);

    void updateStatus(Long id, Integer status);

    void cancelOrder(Long id);

    void confirmOrder(Long id);

    List<OrderVO> queryMyOrders();

    OrderDetailVO getOrderDetail(Long orderId);

    void restoreStockAndSold(Long orderId);
}
